import timeit

def factorial(n):
    if n == 0:
        return 1
    else:
        return n * factorial(n-1)

def main():
    result = factorial(20)
    print(f"Factorial of 20 is {result}")

if __name__ == "__main__":
    # 使用 timeit 测量 main 函数的执行时间
    execution_time = timeit.timeit('main()', setup='from __main__ import main', number=2)
    print(f"Execution time of main() over 1000 runs: {execution_time:.6f} seconds")